﻿using System;
using System.Collections.Generic;
using System.Text;

using HadronData;

namespace HadronEditor
{
    class NameManager
    {
        public static String GenerateLevelName(World p_world)
        {
            int nCount = 0;
            while (true)
            {
                String strName = "Level" + nCount.ToString("00");
                if (p_world.GetLevel(strName) == null)
                    return strName;
                ++nCount;
            }
        }

        public static String GenerateLayerName(Level p_level)
        {
            int nCount = 0;
            while (true)
            {
                String strName = "Layer" + nCount.ToString("00");
                if (p_level.GetLayer(strName) == null)
                    return strName;
                ++nCount;
            }
        }

        public static String GenerateEntityName(Level p_level)
        {
            int nCount = 0;
            while (true)
            {
                String strName = "Entity" + nCount.ToString("00");
                if (p_level.GetEntityMarker(strName) == null)
                    return strName;
                ++nCount;
            }
        }
    }
}
